package com.xkdx.guangguang.fragment.shop.search;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import com.xkdx.guangguang.module.network.AbsAction;
import com.xkdx.guangguang.module.statics.IConstants;

public class SearchShopAction extends AbsAction {
	String cityID, keywords, distance;

	public SearchShopAction(String cityID, String keywords, String distance) {
		this.cityID = cityID;
		this.keywords = keywords;
		this.distance = distance;
	}

	@Override
	public void constructRequest() {
		HashMap<String, String> map = new HashMap<String, String>();
		map.put("DeviceID", "2");
		map.put("RegionID", cityID);
		map.put("Keywords", keywords);
		map.put("Longitude", String.valueOf(IConstants.lon));
		map.put("Latitude", String.valueOf(IConstants.lat));
		map.put("Distance", distance);
		map.put("ShopType", "1");
		map.put("PageIndex", "1");
		map.put("PageSize", "1000");

		String json = constructJson(map);
		Parameter parameter = new Parameter("shopInterface", "searchShopList", json);

		List<Parameter> list = new ArrayList<Parameter>();
		list.add(parameter);
		requestData = constructMod(list);

	}

}
